package cn.wolfcode.p2p.base.domain;

import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

import lombok.Getter;
import lombok.Setter;

/**
 * Created by wolfcode on 2018/7/23.
 */
@Setter
@Getter
public class SystemDictionaryItem extends BaseDomain {
	// 只是用到了他们的Id,所以不用写他们得关联对象
	private Long parentId;// 分类ID
	private String title;// 名称
	private int sequence;// 顺序

	public String getJsonString() {
		Map<String, Object> json = new HashMap<>();
		json.put("id", id);
		json.put("parentId", parentId);
		json.put("title", title);
		json.put("sequence", sequence);
		return JSONObject.toJSONString(json);
	}
}
